package com.etc.controller;

import com.etc.dao.UserMapper;
import com.etc.entity.User;
import com.etc.entity.UserKey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class LoginHandler {

    @Autowired
    private UserMapper userMapper;


    @RequestMapping("/login")
    @ResponseBody
    public User login(){
        System.out.println("我来了");
        UserKey userKey = new UserKey();
        userKey.setId(1);
        User user = userMapper.selectByPrimaryKey(userKey);
        return user;
    }
}
